#pragma once

#include <QDialog>
#include "ui_Scores.h"
#include <tuple>
#include <set>
#include <QFile>
#include <iostream>

namespace qtangram {
    typedef std::tuple<unsigned int, QString, QString> ScoresItem;

    struct comp {
	bool operator()(const ScoresItem& left, const ScoresItem& right) const {
	    return std::get<0>(left) < std::get<0>(right);
	}
    };

    class Scores : public QDialog, private Ui_Scores {
	Q_OBJECT
    public:
	Scores(QWidget* parent = 0);
	~Scores();
	void display();
	void add(ScoresItem item);
    private slots:
	void onClearClicked();
    private:
	std::multiset<ScoresItem, comp> itemList;
	const quint32 magicNr;
    };
}
